package com.pulse.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pulse.common.annotation.Excel;
import com.pulse.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.List;

/**
 * 光路监测对象 otu_circuit_measure
 *
 * @author 陆帅
 * @date 2024-07-17
 */
public class CircuitMeasure extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** id */
    private Long measureId;

    /** 设备编号 */
    @Excel(name = "设备编号",sort = 2)
    private String deviceNo;

    /** 通道号 */
    @Excel(name = "通道号",sort = 3)
    private Integer channel;

    /** 1：点名测试  2：定期测试  3：复测 */
    @Excel(name = "测试来源",dictType = "otu_measure_type",sort = 4)
    private Integer type;

    /** 0：非参考线  1：参考线 */
    @Excel(name = "是否参考曲线",readConverterExp = "0=否,1=是",sort = 5)
    private Integer defaultMeasure;

    /** 波长 */
    @Excel(name = "波长",sort = 6)
    private Long paramWaveLength;

    /** 量程 0为自动 单位m */
    @Excel(name = "量程(m)",sort = 7)
    private Long paramRd;

    /** 脉宽 0为自动 单位ns */
    @Excel(name = "脉宽(ns)",sort = 8)
    private Long paramPw;

    /** 平均时间 单位s */
    @Excel(name = "平均时间(s)",sort = 9)
    private Long paramTestTime;

    /** 测试模式  0 平均测试   1 实时测试  2 后台测试 */
    @Excel(name = "测试模式")
    private Long paramTestMode;

    /** 折射率 */
    @Excel(name = "折射率",sort=10)
    private String paramIor;

    /** 回散系数 */
    @Excel(name = "回散系数",sort=11)
    private String paramBackScatter;

    /** 熔接损耗阈值  */
    @Excel(name = "非反射门限",sort=12)
    private String paramNonReflectThreshold;

    /** 反射率阈值 */
    @Excel(name = "反射门限",sort = 13)
    private String paramReflectThreshold;

    /** 结束门限 */
    @Excel(name = "结束门限",sort = 14)
    private String paramFinalThreshold;

    /** 总回波损耗 */
    private String totalReturnLoss;

    /** 全程衰耗 */
    private String wholeAtten;

    private String wholeAvgAtten;

    /** 全程长度 */
    private String wholeLen;

    /** 结果数据文件 */
    private Long fileId;

    /** -1：删除
     0：完成
     1：待测试
     2：待解析
     11：测试失败
     12：解析失败 */
    @Excel(name = "测试状态",dictType = "otu_measure_status",sort = 15)
    private Integer status;

    /** 光路状态（未判定前设为null）  0：正常  1：异常 */
    @Excel(name = "光路状态",dictType = "otu_circuit_status",sort = 16)
    private Integer circuitStatus;

    /** 1：OTDR模式 2：LDOPM模式 */
    private Integer measureMode;


    @Excel(name = "失败原因",dictType = "otu_failure_reason",sort = 17)
    private String remark;

    /** 创建时间 */
    @Excel(name = "测试时间",dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 18)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private List<CircuitMeasureEvent> events;

    /** 前端测试组装mqtt消息用 */
    private String from;

    public Long getMeasureId() {
        return measureId;
    }

    public void setMeasureId(Long measureId) {
        this.measureId = measureId;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getDefaultMeasure() {
        return defaultMeasure;
    }

    public void setDefaultMeasure(Integer defaultMeasure) {
        this.defaultMeasure = defaultMeasure;
    }

    public Long getParamWaveLength() {
        return paramWaveLength;
    }

    public void setParamWaveLength(Long paramWaveLength) {
        this.paramWaveLength = paramWaveLength;
    }

    public Long getParamRd() {
        return paramRd;
    }

    public void setParamRd(Long paramRd) {
        this.paramRd = paramRd;
    }

    public Long getParamPw() {
        return paramPw;
    }

    public void setParamPw(Long paramPw) {
        this.paramPw = paramPw;
    }

    public Long getParamTestTime() {
        return paramTestTime;
    }

    public void setParamTestTime(Long paramTestTime) {
        this.paramTestTime = paramTestTime;
    }

    public Long getParamTestMode() {
        return paramTestMode;
    }

    public void setParamTestMode(Long paramTestMode) {
        this.paramTestMode = paramTestMode;
    }

    public String getParamIor() {
        return paramIor;
    }

    public void setParamIor(String paramIor) {
        this.paramIor = paramIor;
    }

    public String getParamBackScatter() {
        return paramBackScatter;
    }

    public void setParamBackScatter(String paramBackScatter) {
        this.paramBackScatter = paramBackScatter;
    }

    public String getParamNonReflectThreshold() {
        return paramNonReflectThreshold;
    }

    public void setParamNonReflectThreshold(String paramNonReflectThreshold) {
        this.paramNonReflectThreshold = paramNonReflectThreshold;
    }

    public String getParamReflectThreshold() {
        return paramReflectThreshold;
    }

    public void setParamReflectThreshold(String paramReflectThreshold) {
        this.paramReflectThreshold = paramReflectThreshold;
    }

    public String getParamFinalThreshold() {
        return paramFinalThreshold;
    }

    public void setParamFinalThreshold(String paramFinalThreshold) {
        this.paramFinalThreshold = paramFinalThreshold;
    }

    public String getTotalReturnLoss() {
        return totalReturnLoss;
    }

    public void setTotalReturnLoss(String totalReturnLoss) {
        this.totalReturnLoss = totalReturnLoss;
    }

    public String getWholeAtten() {
        return wholeAtten;
    }

    public void setWholeAtten(String wholeAtten) {
        this.wholeAtten = wholeAtten;
    }

    public String getWholeAvgAtten() {
        return wholeAvgAtten;
    }

    public void setWholeAvgAtten(String wholeAvgAtten) {
        this.wholeAvgAtten = wholeAvgAtten;
    }

    public String getWholeLen() {
        return wholeLen;
    }

    public void setWholeLen(String wholeLen) {
        this.wholeLen = wholeLen;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getCircuitStatus() {
        return circuitStatus;
    }

    public void setCircuitStatus(Integer circuitStatus) {
        this.circuitStatus = circuitStatus;
    }

    public Integer getMeasureMode() {
        return measureMode;
    }

    public void setMeasureMode(Integer measureMode) {
        this.measureMode = measureMode;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<CircuitMeasureEvent> getEvents() {
        return events;
    }

    public void setEvents(List<CircuitMeasureEvent> events) {
        this.events = events;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }
}
